package com.caishi.lkx.exam.service;

import com.caishi.lkx.exam.model.CategoryModel;
import com.caishi.lkx.exam.model.ColumnModel;
import com.caishi.lkx.exam.model.PackageSkuModel;
import com.zzw.common.entity.BaseService;
import com.zzw.common.service.NameService;
import com.zzw.common.service.service.SortService;
import com.caishi.lkx.order.CommonAssetsService;

import java.util.List;


public interface IPackageSkuService extends BaseService<PackageSkuModel, String>,
        SortService<PackageSkuModel>,
        NameService<PackageSkuModel, String>,
        CommonAssetsService<PackageSkuModel, String> {
    Boolean addOrUpdate(List<PackageSkuModel> packageSkuModels, String packageId);

    List<ColumnModel> getEffecitiveColums(String skuId);

    /**
     * 获取关联的科目列表
     * @param skuId
     * @return
     */
    List<CategoryModel> getCategories(String skuId);

    void addSellCount(String skuId);

    //通过考试id查询sku后 进行比较 其配置的产品 和 productIds 是否有交集
    List<String> selectPackageIdsByExamIdAndProductIds(String examId, List<String> productIds);

    /**
     * @return java.lang.Boolean
     * @Param: [packageIds]
     * @Author: huangpeng
     * @Date: 2022/3/14 9:47
     * @Description: 通过套餐id删除对应的sku
     */
    Boolean deleteByPackageIds(List<String> packageIds);

    Boolean deleteByPackageId(String packageId);
}
